package com.jwtproject.bootserver.util;




import com.jwtproject.bootserver.status.ProjectStatusEnum;

import java.io.Serializable;

public class Result implements Serializable {

    private String message;
    private int code;
    private Object data;
    private Object check;

    public Result() {
    }

    public Result(ProjectStatusEnum projectStatusEnum){
        this.message = projectStatusEnum.getMsg();
        this.code = projectStatusEnum.getCode();
    }

    public Result(ProjectStatusEnum projectStatusEnum, Object obj){
        this.message = projectStatusEnum.getMsg();
        this.code = projectStatusEnum.getCode();
        this.data = obj;
    }

    public Result(String message, int code, Object obj) {
        this.message = message;
        this.code = code;
        this.data = obj;
    }

    public Result(String message, int code, Object obj, Object check) {
        this.message = message;
        this.code = code;
        this.data = obj;
        this.check = check;
    }


    public Object getCheck() {
        return check;
    }

    public void setCheck(Object check) {
        this.check = check;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" +
                "message='" + message + '\'' +
                ", code='" + code + '\'' +
                ", data=" + data +
                ", check=" + check +
                '}';
    }
}
